ActiveReports Developer 7
ActiveReports 7 with MVC Sample
See Also Support Forum
ActiveReports Developer 7 > ActiveReports Developer Guide > Samples and Walkthroughs > Samples > Professional > ActiveReports 7 with MVC Sample

Glossary Item Box

The ActiveReports7 with MVC sample demonstrates an MVC web application with the ActiveReports Web Viewer. This Sample is part of the ActiveReports Developer Professional Edition. 

Note: Before running this sample, you must first install the ASP.NET MVC 3 framework on your machine.

ShowSample Location

ShowVisual Basic.NET

<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Professional\VB.NET\ActiveReports7WithMVC/code>

ShowC#

<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Professional\C#\ActiveReports7WithMVC

ShowRuntime Features

When you run the project, the page with the Customer Index view appears. On this page, you can click a customer in the list to open a new page with the Customer Details information. At the bottom of the page, there are two links - Freight Summary (section report) and Order Summary (page report). Clicking the Freight Summary (section report) link opens a page with the OrderReport report. Clicking the Order Summary (page report) link opens a page with the OrderDetailsReport.rdlx report.

ShowProject Details

ShowControllers

This folder contains the HomeController that handles the user interaction and returns the main Index view, the CustomerDetails view and the views with Freight Summary (section report) and Order Summary (page report).

ShowDBContext

This folder contains the NWindData class that gets the Customer, Orders, Order Details tables of the NWIND.mdb and populates the data into the components of this sample project.

ShowModels

This folder contains the following classes.

Customer - a container for the rows in the Customers table of NWind.mdb.

Order - a container for the rows in the Orders table of NWind.mdb.

OrderDetails - a container for the rows in the Order Details table of NWind.mdb.

ReportDescriptor - the class representation of the ReportType (section or page layout) and the CustomerID.

Repository - a container for data required by the application.

ShowReports

OrderDetailsReport.rdlx: This report uses the object provider to connect to data at runtime. It uses the Table data region to display order details and the Plain Line chart to display sales by order id. The Table data is grouped by OrderID. Some TextBox controls of the Table use the Sum function to display the total price information for each order.

This is the report that opens in a separate view when you click the Order Summary (page report) link on the Customer Details page. 

OrderReport: This report binds to data at runtime. The report uses the Textbox and Label controls to display the order details and the Bar chart to display the freight amounts by ship date.

This is the report that opens in a separate view when you click the Freight Summary (section report) link on the Customer Details page.

ShowViews

ShowHome folder

This folder contains the following views.

_Layout.cshtml. The default layout file.

_ViewStart.cshtml. The default view start file.

Details.cshtml. The Customer Details view file. 

Index.cshtml. The Index view file. 

StartPage.cshtml. The template for the Index view.

Viewer.cshtml. The template for the section report and page report views.  

WebViewer.ascx. The form that contains the ActiveReports WebViewer control. 

ShowWeb.config

The configuration file that contains the httpHandlers that allow ActiveReports Developer to process view pages on the Web.

ShowActiveReports.ReportService.asmx

The report web service required for the proper functioning of the Web Viewer. The ActiveReports.ReportService.asmx is added automatically to the project when you place the Viewer control on the form. You can also can add this service by using Add New Item in the Visual Studio 2010 Project menu.

ShowGlobal.asax

The default class that sets global URL routing values for this web application.

ShowWeb.config

The configuration file that contains the httpHandlers that allow ActiveReports Developer to process this web application.

Note that you need to manually update version information here when you update your version of ActiveReports Developer.

See Also

©2014. ComponentOne, a division of GrapeCity. All rights reserved.